﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Elysium.Controls;
using Elysium.Demo.Configuracion.Empresa;
using SIIE_ERP.Codigo;

namespace Elysium.Demo.Bancos
{
    /// <summary>
    /// Lógica de interacción para Menu_Configuracion.xaml
    /// </summary>
    public partial class Menu_Bancos : UserControl
    {
        private UsuarioActivo _sesion;
        
        public Menu_Bancos(ref UsuarioActivo usuario)
        {
            InitializeComponent();
            this._sesion = usuario;
        }

        private void Expander_Catalogos_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Transacciones != null)
                Expander_Transacciones.IsExpanded = false;
            if (Expander_Reportes != null)
                Expander_Reportes.IsExpanded = false;  
        }

        private void Expander_Transacciones_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Catalogos != null)
                Expander_Catalogos.IsExpanded = false;
            if (Expander_Reportes != null)
                Expander_Reportes.IsExpanded = false;  
        }

        private void Expander_Reportes_Expanded_1(object sender, RoutedEventArgs e)
        {
            if (Expander_Catalogos != null)
                Expander_Catalogos.IsExpanded = false;
            if (Expander_Transacciones != null)
                Expander_Transacciones.IsExpanded = false;  
        }

        private void ButtonMonedas_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.Monedas_Consulta(ref _sesion);
        }

        private void ButtonTipoDeCambio_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.TipoCambio_Consulta(ref _sesion);
        }

        private void ButtonCuentasBancarias_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.CuentasBancarias_Consulta(ref _sesion);
        }

        private void ButtonTarjetasDeCredito_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.TarjetaCredito_Consulta(ref _sesion);
        }

        private void ButtonFormasDePago_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.FormaPago_Consulta(ref _sesion);
        }

        private void ButtonMetodosDePago_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.MetodoPago_Consulta(ref _sesion);
        }

        private void ButtonTerminosDePago_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.TerminoPago_Consulta(ref _sesion);
        }

        private void ButtonTasasDeImpuestos_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.TasasImpuestos_Consulta(ref _sesion);
        }

        private void ButtonTiposDeMovimientoBancarios_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Catalogos.TipoMovimientoBancario_Consulta(ref _sesion);
        }

        private void ButtonPagosAClientes_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Transacciones.PagoCliente_Consulta(ref _sesion);
        }

        private void ButtonPagosAProveedores_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Transacciones.PagoProveedores_Consulta(ref _sesion);
        }

        private void ButtonMovimientosBancarios_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Transacciones.MovimientoBancario_Consulta(ref _sesion);
        }

        private void ButtonConciliacionesBancarias_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Transacciones.ConciliacionesBancarias_Consulta(ref _sesion);
        }

        private void ButtonTransferencias_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewBancos.Content = new Transacciones.TransferenciaBancaria_Consulta(ref _sesion);
        }

        private void ButtonReporte1_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.GenericReport MiReporte = new Informes.GenericReport(ref _sesion, "Informes/Reportes/Operativos/Bancos/Cuentas_Bancarias.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte2_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.GenericReport MiReporte = new Informes.GenericReport(ref _sesion, "Informes/Reportes/Operativos/Bancos/Tarjetas_Credito.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte3_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.GenericReport MiReporte = new Informes.GenericReport(ref _sesion, "Informes/Reportes/Operativos/Bancos/Formas_Pago.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte4_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.GenericReport MiReporte = new Informes.GenericReport(ref _sesion, "Informes/Reportes/Operativos/Bancos/Tipos_Mov_Banco.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte5_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.Seleccion_Bancos_Pagos MiReporte = new Informes.Seleccion_Bancos_Pagos(ref _sesion, "Informes/Reportes/Operativos/Bancos/Pagos_Cliente.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte6_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.Seleccion_Bancos_Pagos_Proveedor MiReporte = new Informes.Seleccion_Bancos_Pagos_Proveedor(ref _sesion, "Informes/Reportes/Operativos/Bancos/Pagos_Proveedor.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte7_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.Seleccion_Bancos_Transferencias MiReporte = new Informes.Seleccion_Bancos_Transferencias(ref _sesion, "Informes/Reportes/Operativos/Bancos/Transferencia_Cuentas.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }

        private void ButtonReporte8_Click_1(object sender, RoutedEventArgs e)
        {
            Elysium.Demo.Informes.Seleccion_Bancos_MovBancarios MiReporte = new Informes.Seleccion_Bancos_MovBancarios(ref _sesion, "Informes/Reportes/Operativos/Bancos/Movimientos_Bancarios.rdlc", true);

            Viewbox MiVB = new Viewbox();
            MiVB.Child = MiReporte;

            ScrollViewBancos.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            ScrollViewBancos.MaxWidth = 1200;
            ScrollViewBancos.MaxHeight = 526;

            ScrollViewBancos.Content = MiVB;
        }
    }
}
